<include file="__THEME__/public_header"/>
<link href="__APP__/friend.css" type="text/css" rel="stylesheet">
<div id="page-wrap">
    <div id="main-wrap">
        <div id="col" class="st-grid content-bg">
            <div id="col4" class="main-left">
                <!--tab菜单-->
                <include file="_tabs"/>
            </div>
            <div id="col7" class="main-right">

                <div class="extend minh person-set">
                    <include file="_nav"/>

                    <div class="clearfix" style="margin-top: 20px;"></div>

                    <div style="float: left">

                        <form action="{:U('friend/Info/updateInfo')}" method="post">
                            <dl class="form-set">
                                <dd>
                                    <div class="form-tt"> 名字：</div>
                                    <div class="form-row">
                                        <input event-node="uname" event-args="old_name={$user_info['uname']}"
                                               name="uname" checkurl="{:U('public/Register/isUnameAvailable')}"
                                               autocomplete="off" type="text" value="{$user_info['name']}"/>
                                    </div>
                                    <input type="hidden" name="old_name" value="{$user_info['name']}"/>
                                </dd>
                                <dd>
                                    <div class="form-tt"> {:L('PUBLIC_GENDER')}：</div>
                                    <div class="form-row">
                                        <label><input name="sex" type="radio" value="1" class="s-ck"
                                            <if condition="1 eq $user_info['sex']">checked="checked"</if>
                                            />男</label>
                                        <label><input name="sex" type="radio" value="2" class="s-ck"
                                            <if condition="2 eq $user_info['sex']">checked="checked"</if>
                                            />女</label>
                                    </div>
                                </dd>

                                <dd>
                                    <div class="form-tt"> 生日：</div>
                                    <div class="form-row">
                                        <input    name="birthday"
                                               autocomplete="off" type="text" value="{$user_info['birthday']}"/>
                                        <span>格式为yyyy/mm/dd</span>
                                    </div>

                                </dd>

                                <dd>
                                    <div class="form-tt"> 身高：</div>
                                    <div class="form-row">
                                        <input name="height"  autocomplete="off" type="text" value="{$user_info['height']}"/>
                                        <span>CM</span>
                                    </div>

                                </dd>

                                <dd>
                                    <div class="form-tt"> 体重：</div>
                                    <div class="form-row">
                                        <input  name="weight"  autocomplete="off" type="text" value="{$user_info['weight']}"/>
                                        <span>KG</span>
                                    </div>

                                </dd>
                                <dd>
                                    <div class="form-tt"> 星座：</div>

                                    <select name="xingzuo">
                                        <option name="0">请选择</option>
                                        <volist name="xingzuo" id="v">
                                            <option name="{$v.xid}"  <if condition="$v.xid eq $user_info['xingzuoid']">selected="selected"</if>>{$v.xname}</option>
                                        </volist>
                                    </select>
                                                    </dd>

                                <dd>
                                    <div class="form-tt"> 血型：</div>
                                    <select name="xuexing">
                                        <option name="0">请选择</option>
                                         <option name="A型"  <if condition="A型 eq $user_info['xuexing']">selected="selected"</if>>A型</option>
                                        <option name="B型" <if condition="B型 eq $user_info['xuexing']">selected="selected"</if>>B型</option>
                                        <option name="AB型" <if condition="AB型 eq $user_info['xuexing']">selected="selected"</if>>AB型</option>
                                        <option name="O型" <if condition="O型 eq $user_info['xuexing']">selected="selected"</if>>O型</option>
                                        <option name="其他" <if condition="其他 eq $user_info['xuexing']">selected="selected"</if>>其他</option>
                                    </select>
                                </dd>

                                {:W('Area1',array('type'=>'_now','curPro'=>$user_info['now_province'],'curCity'=>$user_info['now_city'],'curArea'=>$user_info['now_area'],'city_names'=>$user_info['location'],'tpl'=>'selectArea'))}

                                {:W('Area1',array('type'=>'_home','curPro'=>$user_info['home_province'],'curCity'=>$user_info['home_city'],'curArea'=>$user_info['home_area'],'city_names'=>$user_info['location'],'tpl'=>'selectArea'))}

                                <dd>
                                    <div class="form-tt"> 个人简介：</div>
                                    <div class="form-row">
                                        <textarea class="s-textarea" name="intro">{$user_info['intro']}</textarea>
                                    </div>
                                </dd>
                                <input class="btn_submit" type="submit" value="保存"/>
                            </dl>
                        </form>

                        <div class="clearfix"></div>


                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<include file="__THEME__/public_footer"/>
<script src="__THEME__/js/module.form.js"></script>

<script>
    $('#btn_school').click(function () {
        mybox = ui.box.show($('#school_box').html(), '选择学校', function () {
        });
        $('.boxy-modal-blackout').css({position: 'fixed'});
    });
    function load_school(pid) {
        $('#school').load("{:U('friend/Info/_school')}", {'pid': pid});
    }
    function set_school(sid, sname) {
        ui.box.close();
        $('#school_id').val(sid);
        $('#show_school').text(sname);
    }
</script>
